package com.micro.modual.extension;

import com.micro.common.MicroConstant;
import com.micro.common.biz.GeneratorCodeUtil;
import com.micro.common.util.SnowFlakeUtil;
import com.micro.modual.entity.Payment;
import com.micro.modual.model.bo.payment.PaymentBO;

/**
 * <h1>支付方式表 延展类</h1>
 *
 * @author LevelCoder
 * @version V1.0.0
 * @email LevelCoder@126.com
 * @date 2020-08-04 00:23:26
 */
public class PaymentExtension {

    /**
     * <h2>转换: 支付方式表 新增</h2>
     *
     * @param paymentBO {@link PaymentBO} 支付方式表 新增/修改 请求对象
     * @return {@link Payment} 支付方式表
     */
    public static Payment converAddPayment(PaymentBO paymentBO) {
        Payment payment = new Payment();
        payment.setId(SnowFlakeUtil.getId());
        return payment;
    }

    /**
     * <h2>转换: 支付方式表 修改</h2>
     *
     * @param paymentBO {@link PaymentBO} 支付方式表 新增/修改 请求对象
     * @return {@link Payment} 支付方式表
     */
    public static Payment converEditPayment(PaymentBO paymentBO) {
        Payment payment = new Payment();
        payment.setId(paymentBO.getId());
        return payment;
    }
}
